<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>首页</title>
    <meta name="page-view-size" content="1280*720" />
    <link rel="stylesheet" href="./css/base.css" />
    <link rel="stylesheet" href="./css/D_Volunteer_flower.css" />
    <script type="text/javascript" src="./lib/js/evm.js"></script>
    <script type="text/javascript" src="./lib/js/Evm_djyw.js"></script>
    <script type="text/javascript" src="./lib/js/key.js"></script>
    <script src="lib/js/md5.js" type="text/javascript" charset="utf-8"></script>
    <script
      src="./lib/js/jquery-1.11.1.min.js"
      type="text/javascript"
      charset="utf-8"
    ></script>
    <script
      src="./lib/js/jquery.cookie.js"
      type="text/javascript"
      charset="utf-8"
    ></script>
    <script src="./js/api.js" type="text/javascript" charset="utf-8"></script>
    <script
      src="./js/public.js"
      type="text/javascript"
      charset="utf-8"
    ></script>
  </head>

  <body onUnload="exitPage();">
    <div class="index-bg" id="indexMain">
      <div class="volunteer">
        <img src="images/indexNav/zy1.png" />
        <div class="volunteerNum">
          
        </div>
      </div>
      <div class="volunteer1">
        <img src="images/indexNav/zy2.png" />
        <div class="volunteerGroupNum">
         
        </div>
      </div>
      <div class="volunteer2">
        <img src="images/indexNav/zy3.png" />
        <div class="volunteerActivityNum">
         
        </div>
      </div>
      <div class="model">  <img src="images/indexNav/zy4.png" /></div>
      <div class="model"><img src="images/indexNav/zy5.png" /></div>
      <div class="model"><img src="images/indexNav/zy6.png" /></div>
      <div class="model"><img src="images/indexNav/zy7.png" /></div>
      <!--  -->
    </div>

    <!--<div class="login-bg">
			<div class="login-img">
				<img id="loginImg" src="" alt="">
			</div>
			<div class="login-msg">
				请扫码登录
			</div>
		</div>-->
  </body>
  <script>
    // 首页视频
    var params = {};

    var modelIndex = {
      isVideo: false,
      disUser: true,
      isIndex: false,
      disHeader: true,
      index: 0, //初始位置
      listName: "model", //模块名称
      containerId: "indexMain", //包含模块的标签id
    };

    var data = [
    {
        name: "志愿风采",
        cid: "30",
        url: "A_SingleList.html",
        model: 'Elegant'
      },
      {
        name: "志愿活动",
        url: "A_SingleList.html",
        model: "volunteerActivityList",
      },
    
     
      {
        name: "志愿先锋",
        url: "C_rankVolunteer.html",
        model: "rankVolunteer",
      },
      {
        name: " ",
        url: "A-diandan.html",
        model: "order",
      },
     
    ];
    function getMessage() {
		var param = {
			id: TV.GetParam('id'),
			area_id: $.cookie('TV_CST_AREA'),
			// access_token: $.cookie("TV_CST_TOKEN"),
		}
		GetDatas('volunteercount', param, function (err, res) {
			mess = res.data;
			$('.volunteerNum').html('<i>'+mess.volunteer+'</i>'+ '<img src="images/gs.png" alt="">');
			$('.volunteerGroupNum').html('<i>'+mess.volunteerGroup+'</i>'+ '<img src="images/gs.png" alt="">');
			$('.volunteerActivityNum').html('<i>'+mess.activity+'</i>'+ '<img src="images/gs.png" alt="">');
		})
		// right.toggleFocus();
	}

	getMessage();
    function direOpt(index, directive) {
      if (directive == "backwards") {
        //左
        console.log("leftleftleft");
        if(index>0){
          index--
        }else{
          index=index
        }
      } else if (directive == "forwards") {
        //右
        console.log("rightright");
        // if (index == 5 || index == 3) {
        // 	index = 3;

        // } else
        if(index< $(".model").length-1){
          index++
        }else{
          index=index
        }
      }
      console.log(index);
      return index;
    }

    function direEnter(index) {
      console.log(index);
      // console.log(mediaStr,'333333333333333')
      // mp.stop();
      //			if(loginsize) {
      // debugger

      if (index == 0) {
        window.location.href = data[index].url + "?titles=" + data[index].name + "&model="+data[index].model;
      } else if (index == 1||index == 4) {
        window.location.href = data[index].url + "?titles=" + data[index].name+"&model="+data[index].model;
      } else if (index == 2) {
        window.location.href = data[index].url + "?titles=" + data[index].name + "&model=" + data[index].model;
      } else if (index == 3) {
        window.location.href = data[index].url + "?titles=" + data[index].name + "&model=" +data[index].model;
      } else if (index === 6) {
      } else {
        window.location.href =data[index].url +"?titles=" + data[index].name +"&model=" + data[index].model;
      }
      //			}
    }

    function exitPage() {
      try {
        mp.stop();
        // statements
      } catch (e) {
        // statements
        console.log(e);
      }
    }
    
  </script>

  <script type="text/javascript" src="js/index.js"></script>
</html>
